# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
pkgname=go-bindata
pkgver=3.1.3
pkgrel=24
pkgdesc="A small utility which generates Go code from any file"
url="https://github.com/go-bindata/go-bindata"
arch="all"
license="CC0-1.0"
makedepends="go"
options="!check" # No test suite
source="go-bindata-$pkgver.tar.gz::https://github.com/go-bindata/go-bindata/archive/v$pkgver.tar.gz"

export GOFLAGS="$GOFLAGS -trimpath -mod=readonly -modcacherw"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -v -o bin/"$pkgname" ./"$pkgname"
}

package() {
	install -Dm0755 bin/"$pkgname" -t "$pkgdir"/usr/bin
}

sha512sums="
870f939cfb07b43c54000d39fa37e8151ca5c20d13eac9bde59e7ec3e2693d8386a1ea4b5372171dac42f8a4f69a754445cb9a4fa51a7a7ba9ec54f3e8a2a2f6  go-bindata-3.1.3.tar.gz
"
